# set working directory -- YOU WILL NEED TO SET YOUR OWN DIRECTORY
setwd('')
# list all files in directory -- THESE TWO ARE EQUIVALENT
dir()
list.files()

# creating dataset
# cbind => column bind
USA <- cbind(1,11,7)
Russia <- cbind(2,8,8)
Mexico <- cbind(5,14,1)
China <- cbind(6,9,5)
India <- cbind(6,8,6)

# ls => list 
ls()

# rbind => row bind -- WE WILL BIND ALL THE ROWS WE CREATED WITH cbind()
keewee <- rbind(USA, Russia, Mexico, China, India)

# c() => concatenate
variable.names <- c("Keewee","Koowoo","Kaawaa")
observation.namess <- c("USA","Russia","Mexico","China","India")
# rownames => row names -- APPLY NAMES TO ROWS
rownames(keewee) <- observations
# colnames => column names -- APPLY NAMES TO COLUMNS
colnames(keewee) <- variables
# save() => save a variables as an R data file
save(keewee,file="keewee.Rda")

# creating difference dataset
USA <- cbind(-10,-6,4)
Russia <- cbind(-6,-6,0)
Mexico <- cbind(-9,4,13)
China <- cbind(-3,1,4)
India <- cbind(-2,0,2)
keewee.diff <- rbind(USA, Russia, Mexico, China, India)
colnames(keewee.diff) <- c("E-O","E-A","O-A")
rownames(keewee.diff) <- c("USA","Russia","Mexico","China","India")
	##alternate: rownames(keewee.diff) <- rownames(keewee)
save(keewee.diff,file='keewee.diff.Rda')


# rm() => remove all variables from workspace -- THIS WAY, WE CAN START FRESH.
rm(list=ls())

